﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class PurchaseInputReportMap : ClassMap<PurchaseInputReport>
    {

        public PurchaseInputReportMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblInputPurchaseReport);
            LazyLoad();

            Id(x => x.Id).GeneratedBy.Assigned().Column("id").Not.Nullable().Precision(18);

            Map(x => x.DateInput).Column("`Date Input`");
            Map(x => x.InputId).Column("`Input ID`").Length(20);
            Map(x => x.OrderDate).Column("`Order Date`");
            Map(x => x.OrderId).Column("`Order ID`").Length(20);
            Map(x => x.Supplierid).Column("SupplierID").Length(20);
            Map(x => x.ItemId).Column("`Item ID`").Length(6);
            Map(x => x.InputQuantity).Column("`Input Quantity`").Precision(53);
            Map(x => x.OrderQuantity).Column("`Order Quantity`").Precision(53);
            Map(x => x.Vat).Column("Vat").Precision(5);
            Map(x => x.OrderPrice).Column("`Order Price`").Precision(53);
            Map(x => x.RealVat).Column("`Real Vat`").Precision(5);
            Map(x => x.TotalPriceVat).Column("`Total Price Vat`").Precision(53);
            Map(x => x.TotalInputPrice).Column("`Total Input Price`").Precision(53);
            Map(x => x.ItemName).Column("`Item Name`").Length(4000);
            Map(x => x.SupplierName).Column("`Supplier Name`").Length(4000);
            Map(x => x.ExistingQty).Column("`Existing Qty`").Precision(53);
            Map(x => x.TotalExistingPrice).Column("`Total Existing Price`").Precision(53);
            Map(x => x.Discount).Column("Discount").Precision(53);
        }
    }
}
